#!/bin/bash

export OPENBLAS_NUM_THREADS=1
export MKL_THREADING_LAYER=sequential

# ./online2_nnet3_pipeline_decoder conf/option.conf

# ./online2_nnet3_pipeline_decoder option.conf

HCLG_path="model/graph_zimu_model_v2_0629_with_dabanhui_after_all_arpa_lambd0_00"

model_name=$(basename ${HCLG_path})_option2

echo $model_name

        # ./online2_nnet3_pipeline_decoder "option2.conf" "ark:/data/cfs/asr_data/meichaoyang001/audio/dabanhui/dabanhui_20211026/utt2spk" \
        #         "scp:/data/cfs/asr_data/meichaoyang001/audio/dabanhui/dabanhui_20211026/wav.scp" > result/${model_name}.result
        # python bin/process_result.py result/${model_name}.result result/${model_name}.nofilter.hyp

        #or

        ./bin/online2_nnet3_pipeline_decoder_mcy ${HCLG_path} "option2.conf" "ark:/data/cfs/asr_data/meichaoyang001/audio/dabanhui/dabanhui_20211026/utt2spk" \
                "scp:/data/cfs/asr_data/meichaoyang001/audio/dabanhui/dabanhui_20211026/wav.scp"| python bin/process_result.py > result/${model_name}.nofilter.hyp

python bin/filter.py result/base.lab result/${model_name}.nofilter.hyp result/${model_name}.hyp

mkdir -p result/score
~/.tmp/jianwei_athena/tools/SCTK/bin/sclite -f 1 -i wsj -r result/base.lab \
    -h result/${model_name}.hyp -e utf-8 -o all -O result/score -f 1
